package com.xnx3.wangmarket.admin.service.impl;

import com.xnx3.j2ee.dao.SqlDAO;
import com.xnx3.wangmarket.admin.entity.QrCode;
import com.xnx3.wangmarket.admin.service.QrCodeService;
import com.xnx3.wangmarket.admin.vo.QrCodeVo;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.util.List;

@Service("QrCodeImpl")
public class QrCodeImpl implements QrCodeService {
    @Resource
    private SqlDAO sqlDAO;
    @Override
    public List<QrCode> queryQrCode(int userid) {
        return sqlDAO.findBySqlQuery("select * from qr_Code where user_id = "+userid,QrCode.class);
    }

    @Override
    public void updateQrCode(QrCode qrCode,int userid, HttpServletRequest request) {
        sqlDAO.save(qrCode);
    }
}
